---
title: bud.hash
description: Configure filename hashing
tags:
  - configuration
  - facade
  - optimization
---

Configure filename hashing.

## Usage

Enable hashing

```ts title=bud.config.ts
bud.hash()
```

```ts title=bud.config.ts
bud.hash(true)
```

Disable hashing

```ts title=bud.config.ts
bud.hash(false)
```

Enable hashing with a custom format:

```ts title=bud.config.ts
bud.hash(`contenthash:12`)
```

Use as a bud.js callback. This is the same as enabling hashing with the default configuration.

```ts title=bud.config.ts
bud.when(bud.isProduction, bud.hash)
```

```ts title=bud.config.ts
bud.tap(bud.hash)
```
